// 该文件用于统一管理用户相关的接口
import request from "@/utils/request";
import {
  loginParamData,
  loginResponseData,
  responseUserInfoData,
  logoutResponseData,
} from "@/api/user/type";
// 统一管理接口
enum API {
  LOGIN_URL = "/admin/acl/index/login",
  USERINFO_URL = "/admin/acl/index/info",
  LOGOUT_URL = "/admin/acl/index/logout",
}
export const reqLogin = (data: loginParamData) =>
  request.post<string, loginResponseData>(API.LOGIN_URL, data);
export const reqUserInfo = () =>
  request.get<string, responseUserInfoData>(API.USERINFO_URL);
export const reqLogout = () =>
  request.post<string, logoutResponseData>(API.LOGOUT_URL);
